{% include 'header.html' %}

<div id="code"></div>


<script type="text/javascript">

    $(function () {
        var data = '{{ data | safe }}';
        $('#code').qrcode(data);
    })

    function quire() {
        $.ajax({
            url: "/services/login/{{ req_id }}/", async: false, success: function (result) {
                console.log(result);
                if (result['errors'] == 0 && result['status'] == 2) {
                    $('#code').html('登录成功')
                }else {
                    $('#code').html('登录失败')
                }


            }
        })
    }
    setInterval("quire()", 5000);
</script>

{% include 'footer.html' %}
